{{extend './layout.htm'}}

{{block 'main'}}
<form method="post" action="{{url('save')}}" class="layui-form">
    <input type="hidden" name="id" value="{{cate.id}}">
    <div class="layui-tab-item layui-show">
        <div class="layui-form-item">
            <label class="layui-form-label">分类名字</label>
            <div class="layui-input-block">
                <input type="text" name="cate_name" lay-verify="required" lay-verType="tips" class="layui-input" value="{{cate.cate_name}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">目录地址</label>
            <div class="layui-input-block">
                <input type="text" name="cate_dir" class="layui-input" value="{{cate.cate_dir}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">SEO标题</label>
            <div class="layui-input-block">
                <input type="text" name="seo_title" class="layui-input" value="{{cate.seo_title}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">关键词</label>
            <div class="layui-input-block">
                <input type="text" name="keywords" class="layui-input" value="{{cate.keywords}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">简介</label>
            <div class="layui-input-block">
                <textarea name="description" placeholder="请输入内容" class="layui-textarea">{{cate.description}}</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="sort" class="layui-input" value="{{cate.sort || 0}}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">显示</label>
            <div class="layui-input-block">
                <input type="checkbox" name="is_show" lay-skin="switch" lay-text="ON|OFF" {{cate.is_show || cate.is_show === undefined ? 'checked' : ''}}>
            </div>
        </div>
    </div>

    <div style="text-align: center;">
        <button class="layui-btn" lay-submit>提交</button>
    </div>
</form>
{{/block}}